//
//  UIView+Frame.m
//  BaiSi
//
//  Created by Rock on 16/5/28.
//  Copyright © 2016年 ForthGroup. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)

- (CGFloat)yb_centerX
{
    return self.center.x;
}
- (void)setYb_centerX:(CGFloat)yb_centerX
{
    CGPoint center = self.center;
    center.x = yb_centerX;
    self.center = center;
}

- (CGFloat)yb_centerY
{
    return self.center.y;
}
- (void)setYb_centerY:(CGFloat)yb_centerY
{
    CGPoint center = self.center;
    center.y = yb_centerY;
    self.center = center;
}

- (CGFloat)yb_height
{
    return self.frame.size.height;
}

- (void)setYb_height:(CGFloat)yb_height
{
    CGRect rect = self.frame;
    rect.size.height = yb_height;
    self.frame = rect;
}

- (CGFloat)yb_width
{
    return self.frame.size.width;
}

- (void)setYb_width:(CGFloat)yb_width
{
    CGRect rect = self.frame;
    rect.size.width = yb_width;
    self.frame = rect;
    
}

- (CGFloat)yb_x
{
    return self.frame.origin.x;
}

- (void)setYb_x:(CGFloat)yb_x
{
    CGRect rect = self.frame;
    rect.origin.x = yb_x;
    self.frame = rect;
    
}

- (CGFloat)yb_y
{
    return self.frame.origin.y;
}
- (void)setYb_y:(CGFloat)yb_y
{
    CGRect rect = self.frame;
    rect.origin.y = yb_y;
    self.frame = rect;
    
}

@end
